
<!DOCTYPE html>

<html>
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>pymatgen.analysis.energy_models &#8212; pymatgen 2020.7.3 documentation</title>
    <link rel="stylesheet" href="../../../_static/basic.css" type="text/css" />
    <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
    <script id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></script>
    <script src="../../../_static/jquery.js"></script>
    <script src="../../../_static/underscore.js"></script>
    <script src="../../../_static/doctools.js"></script>
    <script src="../../../_static/language_data.js"></script>
    <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
    <link rel="index" title="Index" href="../../../genindex.html" />
    <link rel="search" title="Search" href="../../../search.html" />
 
<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-33990148-1']);
  _gaq.push(['_trackPageview']);
</script>

  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="nav-item nav-item-0"><a href="../../../index.html">pymatgen 2020.7.3 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../../index.html" >Module code</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="../../pymatgen.html" accesskey="U">pymatgen</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">pymatgen.analysis.energy_models</a></li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
          <div class="body" role="main">
            
  <h1>Source code for pymatgen.analysis.energy_models</h1><div class="highlight"><pre>
<span></span><span class="c1"># coding: utf-8</span>
<span class="c1"># Copyright (c) Pymatgen Development Team.</span>
<span class="c1"># Distributed under the terms of the MIT License.</span>

<span class="sd">&quot;&quot;&quot;</span>
<span class="sd">This module implements a EnergyModel abstract class and some basic</span>
<span class="sd">implementations. Basically, an EnergyModel is any model that returns an</span>
<span class="sd">&quot;energy&quot; for any given structure.</span>
<span class="sd">&quot;&quot;&quot;</span>

<span class="kn">import</span> <span class="nn">abc</span>

<span class="kn">from</span> <span class="nn">monty.json</span> <span class="kn">import</span> <span class="n">MSONable</span>
<span class="kn">from</span> <span class="nn">pymatgen.analysis.ewald</span> <span class="kn">import</span> <span class="n">EwaldSummation</span>
<span class="kn">from</span> <span class="nn">pymatgen.symmetry.analyzer</span> <span class="kn">import</span> <span class="n">SpacegroupAnalyzer</span>

<span class="n">__version__</span> <span class="o">=</span> <span class="s2">&quot;0.1&quot;</span>


<div class="viewcode-block" id="EnergyModel"><a class="viewcode-back" href="../../../pymatgen.analysis.energy_models.html#pymatgen.analysis.energy_models.EnergyModel">[docs]</a><span class="k">class</span> <span class="nc">EnergyModel</span><span class="p">(</span><span class="n">MSONable</span><span class="p">,</span> <span class="n">metaclass</span><span class="o">=</span><span class="n">abc</span><span class="o">.</span><span class="n">ABCMeta</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">    Abstract structure filter class.</span>
<span class="sd">    &quot;&quot;&quot;</span>

<div class="viewcode-block" id="EnergyModel.get_energy"><a class="viewcode-back" href="../../../pymatgen.analysis.energy_models.html#pymatgen.analysis.energy_models.EnergyModel.get_energy">[docs]</a>    <span class="nd">@abc</span><span class="o">.</span><span class="n">abstractmethod</span>
    <span class="k">def</span> <span class="nf">get_energy</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">structure</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">float</span><span class="p">:</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        :param structure: Structure</span>
<span class="sd">        :return: Energy value</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="k">return</span> <span class="mf">0.0</span></div>

<div class="viewcode-block" id="EnergyModel.from_dict"><a class="viewcode-back" href="../../../pymatgen.analysis.energy_models.html#pymatgen.analysis.energy_models.EnergyModel.from_dict">[docs]</a>    <span class="nd">@classmethod</span>
    <span class="k">def</span> <span class="nf">from_dict</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">d</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        :param d: Dict representation</span>
<span class="sd">        :return: EnergyModel</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="k">return</span> <span class="bp">cls</span><span class="p">(</span><span class="o">**</span><span class="n">d</span><span class="p">[</span><span class="s1">&#39;init_args&#39;</span><span class="p">])</span></div></div>


<div class="viewcode-block" id="EwaldElectrostaticModel"><a class="viewcode-back" href="../../../pymatgen.analysis.energy_models.html#pymatgen.analysis.energy_models.EwaldElectrostaticModel">[docs]</a><span class="k">class</span> <span class="nc">EwaldElectrostaticModel</span><span class="p">(</span><span class="n">EnergyModel</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">    Wrapper around EwaldSum to calculate the electrostatic energy.</span>
<span class="sd">    &quot;&quot;&quot;</span>

    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">real_space_cut</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">recip_space_cut</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                 <span class="n">eta</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">acc_factor</span><span class="o">=</span><span class="mf">8.0</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Initializes the model. Args have the same definitions as in</span>
<span class="sd">        :class:`pymatgen.analysis.ewald.EwaldSummation`.</span>

<span class="sd">        Args:</span>
<span class="sd">            real_space_cut (float): Real space cutoff radius dictating how</span>
<span class="sd">                many terms are used in the real space sum. Defaults to None,</span>
<span class="sd">                which means determine automagically using the formula given</span>
<span class="sd">                in gulp 3.1 documentation.</span>
<span class="sd">            recip_space_cut (float): Reciprocal space cutoff radius.</span>
<span class="sd">                Defaults to None, which means determine automagically using</span>
<span class="sd">                the formula given in gulp 3.1 documentation.</span>
<span class="sd">            eta (float): Screening parameter. Defaults to None, which means</span>
<span class="sd">                determine automatically.</span>
<span class="sd">            acc_factor (float): No. of significant figures each sum is</span>
<span class="sd">                converged to.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">real_space_cut</span> <span class="o">=</span> <span class="n">real_space_cut</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">recip_space_cut</span> <span class="o">=</span> <span class="n">recip_space_cut</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">eta</span> <span class="o">=</span> <span class="n">eta</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">acc_factor</span> <span class="o">=</span> <span class="n">acc_factor</span>

<div class="viewcode-block" id="EwaldElectrostaticModel.get_energy"><a class="viewcode-back" href="../../../pymatgen.analysis.energy_models.html#pymatgen.analysis.energy_models.EwaldElectrostaticModel.get_energy">[docs]</a>    <span class="k">def</span> <span class="nf">get_energy</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">structure</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        :param structure: Structure</span>
<span class="sd">        :return: Energy value</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">e</span> <span class="o">=</span> <span class="n">EwaldSummation</span><span class="p">(</span><span class="n">structure</span><span class="p">,</span> <span class="n">real_space_cut</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">real_space_cut</span><span class="p">,</span>
                           <span class="n">recip_space_cut</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">recip_space_cut</span><span class="p">,</span>
                           <span class="n">eta</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">eta</span><span class="p">,</span>
                           <span class="n">acc_factor</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">acc_factor</span><span class="p">)</span>
        <span class="k">return</span> <span class="n">e</span><span class="o">.</span><span class="n">total_energy</span></div>

<div class="viewcode-block" id="EwaldElectrostaticModel.as_dict"><a class="viewcode-back" href="../../../pymatgen.analysis.energy_models.html#pymatgen.analysis.energy_models.EwaldElectrostaticModel.as_dict">[docs]</a>    <span class="k">def</span> <span class="nf">as_dict</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        :return: MSONable dict</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="k">return</span> <span class="p">{</span><span class="s2">&quot;version&quot;</span><span class="p">:</span> <span class="n">__version__</span><span class="p">,</span>
                <span class="s2">&quot;@module&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="vm">__class__</span><span class="o">.</span><span class="vm">__module__</span><span class="p">,</span>
                <span class="s2">&quot;@class&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="vm">__class__</span><span class="o">.</span><span class="vm">__name__</span><span class="p">,</span>
                <span class="s2">&quot;init_args&quot;</span><span class="p">:</span> <span class="p">{</span><span class="s2">&quot;real_space_cut&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">real_space_cut</span><span class="p">,</span>
                              <span class="s2">&quot;recip_space_cut&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">recip_space_cut</span><span class="p">,</span>
                              <span class="s2">&quot;eta&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">eta</span><span class="p">,</span>
                              <span class="s2">&quot;acc_factor&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">acc_factor</span><span class="p">}}</span></div></div>


<div class="viewcode-block" id="SymmetryModel"><a class="viewcode-back" href="../../../pymatgen.analysis.energy_models.html#pymatgen.analysis.energy_models.SymmetryModel">[docs]</a><span class="k">class</span> <span class="nc">SymmetryModel</span><span class="p">(</span><span class="n">EnergyModel</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">    Sets the energy to the -ve of the spacegroup number. Higher symmetry =&gt;</span>
<span class="sd">    lower &quot;energy&quot;.</span>

<span class="sd">    Args have same meaning as in</span>
<span class="sd">    :class:`pymatgen.symmetry.finder.SpacegroupAnalyzer`.</span>
<span class="sd">    &quot;&quot;&quot;</span>

    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">symprec</span><span class="o">=</span><span class="mf">0.1</span><span class="p">,</span> <span class="n">angle_tolerance</span><span class="o">=</span><span class="mi">5</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Args:</span>
<span class="sd">            symprec (float): Symmetry tolerance. Defaults to 0.1.</span>
<span class="sd">            angle_tolerance (float): Tolerance for angles. Defaults to 5 degrees.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">symprec</span> <span class="o">=</span> <span class="n">symprec</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">angle_tolerance</span> <span class="o">=</span> <span class="n">angle_tolerance</span>

<div class="viewcode-block" id="SymmetryModel.get_energy"><a class="viewcode-back" href="../../../pymatgen.analysis.energy_models.html#pymatgen.analysis.energy_models.SymmetryModel.get_energy">[docs]</a>    <span class="k">def</span> <span class="nf">get_energy</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">structure</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        :param structure: Structure</span>
<span class="sd">        :return: Energy value</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">f</span> <span class="o">=</span> <span class="n">SpacegroupAnalyzer</span><span class="p">(</span><span class="n">structure</span><span class="p">,</span> <span class="n">symprec</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">symprec</span><span class="p">,</span> <span class="n">angle_tolerance</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">angle_tolerance</span><span class="p">)</span>
        <span class="k">return</span> <span class="o">-</span><span class="n">f</span><span class="o">.</span><span class="n">get_space_group_number</span><span class="p">()</span></div>

<div class="viewcode-block" id="SymmetryModel.as_dict"><a class="viewcode-back" href="../../../pymatgen.analysis.energy_models.html#pymatgen.analysis.energy_models.SymmetryModel.as_dict">[docs]</a>    <span class="k">def</span> <span class="nf">as_dict</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        :return: MSONable dict</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="k">return</span> <span class="p">{</span><span class="s2">&quot;version&quot;</span><span class="p">:</span> <span class="n">__version__</span><span class="p">,</span>
                <span class="s2">&quot;@module&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="vm">__class__</span><span class="o">.</span><span class="vm">__module__</span><span class="p">,</span>
                <span class="s2">&quot;@class&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="vm">__class__</span><span class="o">.</span><span class="vm">__name__</span><span class="p">,</span>
                <span class="s2">&quot;init_args&quot;</span><span class="p">:</span> <span class="p">{</span><span class="s2">&quot;symprec&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">symprec</span><span class="p">,</span>
                              <span class="s2">&quot;angle_tolerance&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">angle_tolerance</span><span class="p">}}</span></div></div>


<div class="viewcode-block" id="IsingModel"><a class="viewcode-back" href="../../../pymatgen.analysis.energy_models.html#pymatgen.analysis.energy_models.IsingModel">[docs]</a><span class="k">class</span> <span class="nc">IsingModel</span><span class="p">(</span><span class="n">EnergyModel</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">    A very simple Ising model, with r^2 decay.</span>
<span class="sd">    &quot;&quot;&quot;</span>

    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">j</span><span class="p">,</span> <span class="n">max_radius</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        Args:</span>
<span class="sd">            j (float): The interaction parameter. E = J * spin1 * spin2.</span>
<span class="sd">            radius (float): max_radius for the interaction.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">j</span> <span class="o">=</span> <span class="n">j</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">max_radius</span> <span class="o">=</span> <span class="n">max_radius</span>

<div class="viewcode-block" id="IsingModel.get_energy"><a class="viewcode-back" href="../../../pymatgen.analysis.energy_models.html#pymatgen.analysis.energy_models.IsingModel.get_energy">[docs]</a>    <span class="k">def</span> <span class="nf">get_energy</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">structure</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        :param structure: Structure</span>
<span class="sd">        :return: Energy value</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">all_nn</span> <span class="o">=</span> <span class="n">structure</span><span class="o">.</span><span class="n">get_all_neighbors</span><span class="p">(</span><span class="n">r</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">max_radius</span><span class="p">)</span>
        <span class="n">energy</span> <span class="o">=</span> <span class="mi">0</span>
        <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">nns</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">all_nn</span><span class="p">):</span>
            <span class="n">s1</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">structure</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">specie</span><span class="p">,</span> <span class="s2">&quot;spin&quot;</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
            <span class="k">for</span> <span class="n">nn</span> <span class="ow">in</span> <span class="n">nns</span><span class="p">:</span>
                <span class="n">energy</span> <span class="o">+=</span> <span class="bp">self</span><span class="o">.</span><span class="n">j</span> <span class="o">*</span> <span class="n">s1</span> <span class="o">*</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">nn</span><span class="o">.</span><span class="n">specie</span><span class="p">,</span> <span class="s2">&quot;spin&quot;</span><span class="p">,</span>
                                                <span class="mi">0</span><span class="p">)</span> <span class="o">/</span> <span class="p">(</span><span class="n">nn</span><span class="o">.</span><span class="n">nn_distance</span> <span class="o">**</span> <span class="mi">2</span><span class="p">)</span>
        <span class="k">return</span> <span class="n">energy</span></div>

<div class="viewcode-block" id="IsingModel.as_dict"><a class="viewcode-back" href="../../../pymatgen.analysis.energy_models.html#pymatgen.analysis.energy_models.IsingModel.as_dict">[docs]</a>    <span class="k">def</span> <span class="nf">as_dict</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        :return: MSONable dict</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="k">return</span> <span class="p">{</span><span class="s2">&quot;version&quot;</span><span class="p">:</span> <span class="n">__version__</span><span class="p">,</span>
                <span class="s2">&quot;@module&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="vm">__class__</span><span class="o">.</span><span class="vm">__module__</span><span class="p">,</span>
                <span class="s2">&quot;@class&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="vm">__class__</span><span class="o">.</span><span class="vm">__name__</span><span class="p">,</span>
                <span class="s2">&quot;init_args&quot;</span><span class="p">:</span> <span class="p">{</span><span class="s2">&quot;j&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">j</span><span class="p">,</span> <span class="s2">&quot;max_radius&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">max_radius</span><span class="p">}}</span></div></div>


<div class="viewcode-block" id="NsitesModel"><a class="viewcode-back" href="../../../pymatgen.analysis.energy_models.html#pymatgen.analysis.energy_models.NsitesModel">[docs]</a><span class="k">class</span> <span class="nc">NsitesModel</span><span class="p">(</span><span class="n">EnergyModel</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">    Sets the energy to the number of sites. More sites =&gt; higher &quot;energy&quot;.</span>
<span class="sd">    Used to rank structures from smallest number of sites to largest number</span>
<span class="sd">    of sites after enumeration.</span>
<span class="sd">    &quot;&quot;&quot;</span>

<div class="viewcode-block" id="NsitesModel.get_energy"><a class="viewcode-back" href="../../../pymatgen.analysis.energy_models.html#pymatgen.analysis.energy_models.NsitesModel.get_energy">[docs]</a>    <span class="k">def</span> <span class="nf">get_energy</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">structure</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        :param structure: Structure</span>
<span class="sd">        :return: Energy value</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="k">return</span> <span class="nb">len</span><span class="p">(</span><span class="n">structure</span><span class="p">)</span></div>

<div class="viewcode-block" id="NsitesModel.as_dict"><a class="viewcode-back" href="../../../pymatgen.analysis.energy_models.html#pymatgen.analysis.energy_models.NsitesModel.as_dict">[docs]</a>    <span class="k">def</span> <span class="nf">as_dict</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">        :return: MSONable dict</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="k">return</span> <span class="p">{</span><span class="s2">&quot;version&quot;</span><span class="p">:</span> <span class="n">__version__</span><span class="p">,</span>
                <span class="s2">&quot;@module&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="vm">__class__</span><span class="o">.</span><span class="vm">__module__</span><span class="p">,</span>
                <span class="s2">&quot;@class&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="vm">__class__</span><span class="o">.</span><span class="vm">__name__</span><span class="p">,</span>
                <span class="s2">&quot;init_args&quot;</span><span class="p">:</span> <span class="p">{}}</span></div></div>
</pre></div>

            <div class="clearer"></div>
          </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="nav-item nav-item-0"><a href="../../../index.html">pymatgen 2020.7.3 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../../index.html" >Module code</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="../../pymatgen.html" >pymatgen</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">pymatgen.analysis.energy_models</a></li> 
      </ul>
    </div>

    <div class="footer" role="contentinfo">
        &#169; Copyright 2011, Pymatgen Development Team.
      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.2.
    </div>
<div class="footer">This page uses <a href="http://analytics.google.com/">
Google Analytics</a> to collect statistics. You can disable it by blocking
the JavaScript coming from www.google-analytics.com.
<script type="text/javascript">
  (function() {
    var ga = document.createElement('script');
    ga.src = ('https:' == document.location.protocol ?
              'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    ga.setAttribute('async', 'true');
    document.documentElement.firstChild.appendChild(ga);
  })();
</script>
</div>

  </body>
</html>